import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class TV_example
{ 
	private static Container cp;

	public static void main (String args[])
	{
		new TV_example();
	}
	public TV_example()
  	{
		JFrame javaFrame = new JFrame("TV_example");
		javaFrame.setSize(330, 270);
		javaFrame.setLocation(400, 600);
		javaFrame.setVisible(true);
		javaFrame.setResizable(false);
		cp = javaFrame.getContentPane();
		cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS));

		String password = "ABCDEF";
		String enteredPass;
		do 
		{
			enteredPass = JOptionPane.showInputDialog(javaFrame, "Please enter your password", 0) ;
		} while ( password != enteredPass );
		cp.add(new JLabel ( " Thank You for login  \n") );
	} 

	class TV
	{	
		private String name;
		private int size;
		private String type;
		private int channelNo;
		 TV(  )
		{
			name = "Sony";
			size = 41;
			type = "LCD";
			channelNo = 0;
		} 
		void describe(  )
		{
			int fish;
			fish = size;
			cp.add(new JLabel ( "********************************************** \n") );
			cp.add(new JLabel ( " Brand Name " + name + "\n") );
			cp.add(new JLabel ( " Size " + fish + "\n") );
			cp.add(new JLabel ( " Type " + type + "\n") );
			cp.add(new JLabel ( " channel " + channelNo + "\n") );
			cp.add(new JLabel ( "********************************************** \n") );
		} 
		void setName( String newName )
		{
			name = newName;
		} 
		void setType( String newType )
		{
			type = newType;
		} 
		void remoteChannelUp(  )
		{
			channelNo = channelNo + 1;
		} 
		String getChannelNo(  )
		{
			return ;
		} 
	} 

}
